
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?
$sql = "select * from tb_teacher where teacher_id = '".$_SESSION['sess_userid']."' ";
$result = $dbfunc->query($sql);
//ดึงข้อมูลแบบอาร์เรย์  โดยเลือกแสดงแค่เรคคอร์ดเดียว (ไม่ใช้ while)
$fetch = mysql_fetch_assoc($result);  
var_dump($fetch);
?>
<style type="text/css">
.body {
}
#boxstye {
	height: auto;
	width: 760px;
}
body,td,th {
	color: #FFF;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 14px;
}
</style>
<div id="boxstye">

<table width="760" border="0" align="left" cellpadding="0" cellspacing="0">
  
    <td bgcolor="#444041"><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
     
      <tr>
        <td width="121" bgcolor="#999999">&nbsp;</td>
        <td width="10" bgcolor="#999999">&nbsp;</td>
        <td width="669" bgcolor="#999999"></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>

<tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;คำนำหน้าชื่อ</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><?php echo $fetch['teacher_prefix'];?></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;ชื่อ-นามสกุล</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><?php echo $fetch['teacher_name'];?> &nbsp;<?php echo $fetch['teacher_surname'];?></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;เพศ</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><? if($fetch['teacher_sex']=="F") echo "<img src='images/female.png'width='16' height='16'>"; else echo "<img src='images/male.png' width='16' height='16'>"; ?>
          </td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;วันเดือนปีเกิด</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><?php echo $fetch['teacher_birthday'];?></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;อีเมล์</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><?php echo $fetch['teacher_email'];?></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;ที่อยู่</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><?php echo $fetch['teacher_add'];?></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" bgcolor="#999999">&nbsp;&nbsp;เบอร์โทร</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999"><?php echo $fetch['teacher_tel'];?></td>
      </tr>
      <tr>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
      <tr>
        <td align="right" bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
        <td bgcolor="#999999">&nbsp;</td>
      </tr>
    </table>
     <table width="100%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <th width="85%" scope="col">&nbsp;</th>
        <th width="15%" bgcolor="#999999" ><a href="?module=admin&page=frm_mag_ter" class="body">กลับหน้าหลัก</a>
        </a></th>
        </tr>
    </table>
</table>
</div>
